﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="examing.aspx.cs" Inherits="examing" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        body
        {
            margin: 0 auto;
            font-size: 12px;
            text-align:center;
        }
        table
        {
            border-collapse: collapse;
        }
        #divContainer
        {        
        	margin:0 auto;
        	text-align:left;
            width: 770px;
            height: auto;
        }
        .divTitle
        {
            height: 30px;
            line-height: 30px;
            vertical-align: middle;
        }
        .divTitle span
        {
            font-weight: bold;
        }
        ul
        {
            list-style: none;
            margin: 0px;
            padding: 0px;
            text-align: center;
        }
        ul li
        {
            display: inline;
            line-height: 40px;
        }
        .gvStyle, .gvStyle td
        {
            line-height: 19px;
            border-top: solid 1px black;
            border-bottom: solid 1px black;
        }
        .gvStyle table td
        {
            border: none;
        }
        a
        {
            color: Red;
        }
        a:visited
        {
            color: Red;
        }
        .optionName
        {
            width: 25px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div id="divContainer">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:Timer ID="Timer1" runat="server" OnTick="Timer1_Tick" Interval="1000">
                </asp:Timer>
                <div style="height: 40px; line-height: 40px; text-align: center;">
                       <h2> 重庆信息技术职业学院在线考试系统</h2>
                </div>
                <div>
                    <asp:FormView ID="fvPaperInfo" runat="server" Width="100%">
                        <ItemTemplate>
                            <table style="width: 100%; line-height: 40px; text-align: center;">
                                <tr>
                                    <td style=" font-size:18px; font-weight:bold; ">
                                        试卷：<asp:Label ID="labExamPaper" runat="server" Text='<%# Eval("examName") %>'></asp:Label>&nbsp;&nbsp;
                                        科目：<asp:Label ID="labKM" runat="server" Text='<%#Eval("kmName") %>'></asp:Label>&nbsp;&nbsp;
                                        卷标：<asp:Label ID="labJB" runat="server" Text='<%#Eval("kmNum") %>'></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <table style="width: 100%; font-size:14px;">
                                            <tr>
                                                <td style="text-align: right;">
                                                    试卷满分：
                                                </td>
                                                <td style="text-align: left;">
                                                    <asp:Label ID="labFull" runat="server" Text='<%# Eval("totalScore") %>'></asp:Label>分
                                                </td>
                                                <td style="text-align: right;">
                                                    合格分数：
                                                </td>
                                                <td style="text-align: left;">
                                                    <asp:Label ID="labPass" runat="server" Text='<%# Eval("eligibleScore") %>'></asp:Label>分
                                                </td>
                                                <td style="text-align: right;">
                                                    考试时间：
                                                </td>
                                                <td style="text-align: left;">
                                                    <asp:Label ID="labTimeOver" runat="server" Text='<%# Eval("timeOver") %>'></asp:Label>分钟
                                                </td>
                                                <td style="text-align: right;">
                                                    试卷类别：
                                                </td>
                                                <td style="text-align: left;">
                                                    <asp:Label ID="labType" runat="server" Text='<%# Eval("examType") %>'></asp:Label>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </ItemTemplate>
                    </asp:FormView>
                </div>
                <div style="text-align: center; line-height: 40px;">
                    <table style="width: 100%;">
                        <tr>
                            <td style="font-size: 14px;">
                                开始时间：<asp:Label ID="labTimeStart" ForeColor="Red" runat="server" Text="00:00:00"></asp:Label>&nbsp;&nbsp;
                                结束时间：<asp:Label ID="labTimeEnd" ForeColor="Red" runat="server" Text="00:00:00"></asp:Label>&nbsp;&nbsp;
                                当前时间：<asp:Label ID="labTimeNow" ForeColor="Red" runat="server" Text="00:00:00"></asp:Label>
                            </td>
                        </tr>
                    </table>
                </div>
                <div id="divQues">
                    <asp:GridView ID="gvExistQues" runat="server" AutoGenerateColumns="False" ShowHeader="False"
                        Width="100%" DataKeyNames="stNum" BorderStyle="None" CssClass="gvStyle">
                        <Columns>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <table>
                                        <tr>
                                            <td>
                                                题型：
                                            </td>
                                            <td>
                                                <asp:Label ID="labTX" runat="server" Text='<%# Eval("txName") %>'></asp:Label>&nbsp;&nbsp;
                                                （满分<asp:Label ID="labFull" runat="server" Text=' <%#Eval("fullScore")%>'></asp:Label>分&nbsp;&nbsp;
                                                每题<asp:Label ID="labSingle" runat="server" Text='<%#Eval("singleScore")%> '></asp:Label>分&nbsp;&nbsp;
                                                共<asp:Label ID="labTL" runat="server" Text='<%#Eval("tl")%>'></asp:Label>题&nbsp;&nbsp;
                                                限时<asp:Label ID="labTimeArea" runat="server" Text='<%#Eval("timeArea")%>'></asp:Label>分钟）
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                问题：
                                            </td>
                                            <td>
                                                <asp:Label ID="labTM" runat="server" Text='<%# Eval("stTM") %>'></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="vertical-align: top;">
                                                选项：
                                            </td>
                                            <td>
                                                <table style="width: 100%;">
                                                    <tr>
                                                        <td class="optionName">
                                                            A.
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="labA" runat="server" Text='<%# Eval("seleA") %>'></asp:Label>
                                                        </td>
                                                        <td class="optionName">
                                                            B.
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="labB" runat="server" Text='<%# Eval("seleB") %>'></asp:Label>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="optionName">
                                                            C.
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="labC" runat="server" Text='<%# Eval("seleC") %>'></asp:Label>
                                                        </td>
                                                        <td class="optionName">
                                                            D.
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="labD" runat="server" Text='<%# Eval("seleD") %>'></asp:Label>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                答案：
                                            </td>
                                            <td>
                                                <asp:CheckBoxList ID="chklstDA" runat="server" RepeatDirection="Horizontal" TextAlign="Left">
                                                    <asp:ListItem Value="A">A</asp:ListItem>
                                                    <asp:ListItem Value="B">B</asp:ListItem>
                                                    <asp:ListItem Value="C">C</asp:ListItem>
                                                    <asp:ListItem Value="D">D</asp:ListItem>
                                                </asp:CheckBoxList>
                                            </td>
                                        </tr>
                                        <tr id="trFX" runat="server" visible="false">
                                            <td>
                                                分析：
                                            </td>
                                            <td>
                                                <asp:Label ID="labDA" runat="server" Text='<%# Eval("result") %>'></asp:Label>
                                                <asp:Label ID="labFX" runat="server" Text='<%# Eval("analysis") %>'></asp:Label>
                                            </td>
                                        </tr>
                                    </table>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <SelectedRowStyle BackColor="#CCFFFF" />
                    </asp:GridView>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
        <div style="text-align: center; line-height: 40px; margin-top: 10px;">
            <asp:Button ID="btnSubmit" runat="server" Text="提交试卷" OnClick="btnSubmit_Click" />&nbsp;&nbsp;
            <asp:Button ID="btnOk" runat="server" Text="计算得分" onclick="btnOk_Click" />&nbsp;&nbsp;
            <asp:Button ID="btnExit" runat="server" Text="退出" onclick="btnExit_Click" />
        </div>
    </div>
    </form>
</body>
</html>
